#include "Color.h"
#include <iostream>
using namespace std;

Color::Color()
{
    //ctor
}

double Color::getRedPercent(unsigned int value)
{
    return double(value >> 16 & 0xFF)/255;
}

double Color::getGreenPercent(unsigned int value)
{
    return double(value >> 8 & 0xFF)/255;
}

double Color::getBluePercent(unsigned int value)
{
    return double(value & 0xFF)/255;
}

double Color::getAlphaPercent(unsigned int value)
{
    unsigned int alphaOffset = (unsigned int)(value & 0xFF000000) >> 24;
    return  double(alphaOffset) / 255;
}
